package com.example.event;

import org.springframework.context.ApplicationEvent;

public class ModuleEvent extends ApplicationEvent {
    private final String moduleName;
    // 事件携带的数据
    private final Object payload;

    public ModuleEvent(Object source, String moduleName, Object payload) {
        super(source);
        this.moduleName = moduleName;
        this.payload = payload;
    }

    public String getModuleName() {
        return moduleName;
    }

    public Object getPayload() {
        return payload;
    }

}
